home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr49
/
273_01.zip
/
GETFSIZE.CC
< prev
next >
Wrap
Text File
|
1993-04-04
|
357b
|
16 lines
#include <dir.h>
long getfsize(char *fn)
/* Return the filesize of a file.
char *fn is a pointer to the filespec.
return = -1 if file is not found.
else returned will be the size of the file.
*/
{
struct ffblk fb;
int rc;
rc=findfirst(fn,&fb,0);
if(rc==0) return(fb.ff_fsize);
return(-1);
}